{% extends "base.html" %}
{% import "_macros.html" as toc_macros %}


{% block title %}{{ page.title }}{% endblock title %}


{% block header_logo %}
<p class="header-title">{{ config.title }} | {{ page.title }}</p>
{% endblock header_logo %}


{% block header_nav_extended %}
{{ toc_macros::render_parent_link(current_path=page.path) | safe }}
{% endblock header_nav_extended %}


{% block content %}
<!-- Details -->
<section aria-label="Page details">
  <h2>{{ page.title }} | Details</h2>
  {% if page.description %}
  <p>{{ page.description }}</p>
  {% endif %}
  {% if page.date %}
  <p class="subtitle">Posted on <strong>{{ page.date }}</strong></p>
  {% endif %}
</section>

<!-- Table of Contents -->
{% if page.toc %}
<nav aria-label="Table of Contents">
  <h2>Table of Contents</h2>
  <ul>
    {{ toc_macros::render_toc(items=page.toc, max_depth=3, current_depth=1) | safe }}
  </ul>
</nav>
{% endif %}

<!-- Page Content -->
<section>
  {{ page.content | safe }}
</section>

{% endblock content %}
